<script setup lang="ts">
import { ElInput, inputEmits, inputProps } from "element-plus";
defineProps({
    ...inputProps,
    label: String,
});
defineEmits(inputEmits);
</script>

<template>
    <div class="w-input">
        {{ label }}
        <!-- 这种情况下需要将inputProps声明的props手动声明传递-->
        <el-input>
            <template
                v-for="(slot, slotName) in $slots"
                #[slotName]="slotProps"
            >
                <slot :name="slotName" v-bind="slotProps" />
            </template>
        </el-input>
    </div>
</template>
